<template>
  <div style="display: flex; justify-content: center; margin-top: 150px">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <el-button style="float: center; padding: 3px 0" type="text"
          >用户登录</el-button
        >
      </div>
      <el-form style="margin-left: 80px">
        <el-col :span="17">
          <el-form-item label="用户名：">
            <input width="120px" />
          </el-form-item>
        </el-col>
        <el-col :span="17">
          <el-form-item label="密码：">
            <input width="120px" />
          </el-form-item>
        </el-col>
        <el-col :span="20">
          <el-form-item>
            <el-button type="primary" @click="login">登录</el-button>
            <el-button type="info">重置</el-button>
          </el-form-item>
        </el-col>
      </el-form>
    </el-card>
  </div>
</template>

<script>
import Index from "./Index.vue";
export default {
  components: { Index },
  methods: {
    login() {
      

      // localStorage.setItem("1111", "莫等闲，白了少年头，空悲切");
      console.log(localStorage.getItem("1111"));

       this.$router.push("/Index");
    },
  },
};
</script>

<style>
.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both;
}

.box-card {
  width: 480px;
}
</style>